const { booleanToString, stringToBoolean } = require("@/util/type-converter");
const PROPS = Object.freeze({
  dictionaryItem: "dictValue",
  key: "dictKey",
  sort: "dictOrder",
  parent: "parentDictName",
  parentId: "parentDictId",
  status: "enabled",
  createdBy: "createUser",
  createdAt: "createTime",
});
module.exports = {
  LABELS: Object.freeze({
    dictionaryItem: "字典项",
    key: "键值",
    sort: "排序值",
    parent: "上级字典",
    parentId: "上级字典",
    status: "状态",
    createdBy: "添加人",
    createdAt: "添加时间",
  }),
  PROPS,
  OPTION_KEYS: Object.freeze({
    status: "dict_item_status",
  }),
  INCOMPATIBLE_FIELD: {
    [PROPS.status]: [booleanToString, stringToBoolean],
  },
};
